package dapps.web.monitor;

import java.util.List;
import java.util.Map;

import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.ActionSupport;

import dapps.service.monitor.SmsJdbcManager;

@SuppressWarnings("serial")
@Results({ @Result(name = "reload", location = "sms!list.action", type = "redirect"),
	@Result(name = "history", location = "smshistory.action", type = "redirect")
	})
public class SmshistoryAction  extends ActionSupport {

	@Autowired
	private SmsJdbcManager smsManager;
	
	private Integer usercode;
	private String yearmonth;	
	private Long districtid;

	List<Map<String, Object>> smshistory;
	
	public String execute() throws Exception{
		smshistory = smsManager.getSmsHistoryList(yearmonth,districtid);
		return SUCCESS;
	}
	public String getYearmonth() {
		return yearmonth;
	}

	public void setYearmonth(String yearmonth) {
		this.yearmonth = yearmonth;
	}



	public Integer getUsercode() {
		return usercode;
	}

	public void setUsercode(Integer usercode) {
		this.usercode = usercode;
	}


	public Long getDistrictid() {
		return districtid;
	}

	public void setDistrictid(Long districtid) {
		this.districtid = districtid;
	}

	
	public List<Map<String, Object>> getSmshistory() {
		return smshistory;
	}

	public void setSmshistory(List<Map<String, Object>> smshistory) {
		this.smshistory = smshistory;
	}
	

}
